﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteMaster.Master"
    Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="Microhard.Framework.MVCHelper" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    监管物日报表
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="section-header">
        <div class="title">
            <img src="<%=Url.Content("~/Content/images/ico-catalog.png")%>" alt="" />
            监管物日报表
        </div>
        <div class="options">
        </div>
    </div>
    <table width="100%">
        <tr>
            <td class="adminTitle">
                <img alt="项目名称" src="<%=Url.Content("~/Content/images/ico-help.gif") %>" title="项目名称"></img><label
                    for="operationName" title="项目名称">项目名称</label>:
            </td>
            <td class="adminData">
                <%--会影响当前页面的Operation--%>
                <%Html.RenderAction("GetSupProjectList", "SupProject", new { area = "WarehouseInsp", ctrAttr = new Microhard.WebUI.Models.AttriubteOfSelectList { ParameterModelName = "SelectedProjectID", IsMulitiplySelect = false, DefaultSelectedText = "请选择", DefaultSelectedValue = Guid.Empty.ToString() } });%>
            </td>
        </tr>
        <tr>
            <td>
                <img alt="开始时间" src="<%=Url.Content("~/Content/images/ico-help.gif") %>" title="开始时间"></img><label
                    for="operationName" title="开始时间">开始时间</label>:
            </td>
            <td>
                <%= Html.Telerik().DatePicker()
            .Name("selectStartDate")      
                %>
            </td>
        </tr>
        <tr>
            <td>
                <img alt="截止时间" src="<%=Url.Content("~/Content/images/ico-help.gif") %>" title="截止时间"></img><label
                    for="operationName" title="截止时间">截止时间</label>:
            </td>
            <td>
                <%= Html.Telerik().DatePicker()
            .Name("selectEndDate") 
                %>
            </td>
        </tr>
    </table>
    <p>
    </p>
    <table class="adminContent">
        <tr>
            <td>
                <%Html.Telerik().Grid<Microhard.WarehouseInsp.Buz.Models.PlgTimeRecordsModel>((List<Microhard.WarehouseInsp.Buz.Models.PlgTimeRecordsModel>)this.Model.Data)
                    .Name("operation-grid")
                    .ToolBar(t => t.Template(g =>
                    { %>
                <%var searchParms = new Dictionary<string, string>();
                  searchParms.Add("ProjectID", "SelectedProjectID");
                  searchParms.Add("StartTime", "selectStartDate");
                  searchParms.Add("EndTime", "selectEndDate");
                %>
                <div class="header-menu">
                    <ul class="t-widget t-reset t-header t-menu">
                        <li class="t-item  t-state-default">
                            <%=Html.Authorized_SearchButton("btnSearch", "查询", "operation-grid", searchParms, "OperationGridOnGridDataBinding")%>
                        </li>
                    </ul>
                </div>
                <%}))
                         .ClientEvents(events => events.OnDataBinding("OperationGridOnGridDataBinding"))
                         .Columns(columns =>
                         {
                             columns.Bound(x => x.CreateTime).Title("日期");
                             columns.Bound(x => x.PlgCategory).Title("监管物名称");
                             columns.Bound(x => x.InCount).Title("入库（吨）");
                             columns.Bound(x => x.OutCount).Title("出库（吨）");
                             columns.Bound(x => x.CurrentCount).Title("结存数量（吨）");
                             columns.Bound(x => x.CurrentPrice).Title("单价（吨/元）");
                             columns.Bound(x => x.CurrentAmount).Title("货值（元）");


                         })
                    .DataBinding(dataBinding => dataBinding.Ajax().Select("_ListWithNoPaging", "PlgTimeRecords"))
                    .EnableCustomBinding(true)
                    .Render();
                %>
            </td>
        </tr>
    </table>
</asp:Content>
